﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NIP.Speech;

namespace NIP.ControlLogic
{
    public interface IControlLogic
    {

        #region Events

        /// <summary>
        /// Occurs when the state of the current Logic changed
        /// </summary>
        event EventHandler StateChanged;

        /// <summary>
        /// Occurs when a unspecified action have started.
        /// </summary>
        event EventHandler ActionStarted;

        /// <summary>
        /// Occurs when a unspecified action have completed.
        /// </summary>
        event EventHandler ActionCompleted;

        #endregion

        #region EventHandlers
        void RecoObject_CommandRecognized(object sender, Speech.EventArgs.CommandRecognizedEventArgs args);
        #endregion


        #region Action Queue

        /// <summary>
        /// Enqueues any RobotController action.
        /// </summary>
        /// <param name="item">Action delegate.</param>
        void EnqueueAction(Action<NIP.DynamicControl.RobotControlEventArgs> item, NIP.DynamicControl.RobotControlEventArgs args);

        /// <summary>
        /// Triggers the ActionCompleted event.
        /// </summary>
        void TriggerActionCompleted();

        /// <summary>
        /// Executes the action queue.
        /// </summary>
        void RunActionQueue();

        #endregion
    }
}
